﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace DoAn_BumTruong_DesignPattern
{
    public class Article
    {
        [Key()]
        public int ArticleID { get; set; }
        [StringLength(225)]
        public string Title { get; set; }
        [StringLength(225)]
        public string Alias { get; set; }
        [StringLength(2000)]
        public string IntroText { get; set; }
        [StringLength(4000)]
        public string FullText { get; set; }
        [StringLength(225)]
        public string CreateBy { get; set; }//nguoi tao bai viet
        public DateTime? CreateDate { get; set; }//Ngay tao bai viet
        public DateTime? ModifeldDate { get; set; }//Ngay cap nhat bai viet
        [StringLength(50)]
        public string ModifeldBy { get; set; }//Nguoi cap nhat bai viet
        [StringLength(225)]
        public string Images { get; set; }//Hinh anh dai dien bai viet
        public bool State { get; set; }//Trang thai cua bai viet
        public bool Publisher { get; set; }//Trang thai hien thi cho nguoi dung thay bai viet
        public int? Hits { get; set; }//So nguoi xem bai viet
        [StringLength(225)]
        public string CheckoutBy { get; set; }//Nguoi dang chinh sua bai viet
        public DateTime? CheckoutDate { get; set; }//Ngay chinh sua 

        //Lien ket du lieu
        public int? MenuID { get; set; }//Lien ket voi bang Menu theo truong MenuID voi 
        public virtual Menu Menu { get; set; }
        //Lien ket voi bang Comment
        public IList<Comments> Comments { get; set; }//1 bai viet co nhieu Comment
    }
}